<?php
global $JA_PERMISSION_CONFIG;
include TPLPATH . 'header.html';
?>
<div class="box">
    <form action="<?php echo jaUrl('user', 'doadd'); ?>" method="post" id="jaform">
        <fieldset>
            <label>邮箱:</label>
            <input type="text" value="" name="email" class="small" /><br class="hid" />
            <p>邮箱将作为用户登录的帐号</p>
            <label>姓名:</label>
            <input type="text" value="" name="name" class="small" /><br class="hid" />
            <label>密码:</label>
            <input type="text" value="123456" name="passwd" class="small" /><br class="hid" />
            <label>手机:</label>
            <input type="text" value="" name="mobile" class="small" /><br class="hid" />
            <label>性别:</label>
            <ul class="field-list">
                <li><input type="radio" value="1" name="gender" class="radio" /> 男</li>
                <li><input type="radio" value="2" name="gender" class="radio" /> 女</li>
            </ul>
            <label>角色:</label>
            <ul class="field-list">
                <?php
                if (!empty($roles)) {
                    foreach ($roles as $val) {
                ?>
                <li><input type="radio" value="<?php echo $val['id'];?>" name="role" class="radio" /> <?php echo $val['name'];?></li>
                <?php
                    }
                }
                ?>
            </ul>
            <label>扩展角色:</label>
            <ul class="field-list">
                <?php
                if (!empty($roles)) {
                    foreach ($roles as $val) {
                ?>
                <li><input type="checkbox" value="<?php echo $val['id'];?>" name="extended_role[]" class="checkbox" /> <?php echo $val['name'];?></li>
                <?php
                    }
                }
                ?>
            </ul>
            <label>扩展权限:</label>
            <ul class="field-list">
                <?php
                if (!empty($JA_PERMISSION_CONFIG)) {
                    foreach ($JA_PERMISSION_CONFIG as $key => $val) {
                ?>
                <li><input type="checkbox" value="<?php echo $key;?>" name="permission[]" class="checkbox" /> <?php echo $val['name'];?></li>
                <?php
                    }
                }
                ?>
            </ul>
            <p></p>
            <a title="Submit" class="button" href="#" onclick="$('#jaform').submit();"><span>提交</span></a>
            <span class="clear"></span>
        </fieldset>
    </form>
</div>
<?php include TPLPATH . 'footer.html'; ?>
